package io.github.meta.ease.websocket.tyrus.server;

import io.github.meta.ease.websocket.WebSocketServer;
import org.glassfish.tyrus.server.Server;
  
import java.util.HashMap;  
import java.util.Map;  
  
public class WebSocketServerLauncher {  
  
    public static void main(String[] args) {  
        Map<String, Object> properties = new HashMap<>();  
        Server server = new Server("localhost", 8025, "/", properties, WebSocketServer.class);
  
        try {  
            server.start();  
            System.out.println("WebSocket server started at ws://localhost:8025/websocket");  
            Thread.sleep(Long.MAX_VALUE); // Keep the server running  
        } catch (Exception e) {  
            e.printStackTrace();  
        } finally {  
            server.stop();  
        }  
    }  
}